package com.demo.admin;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class AdminInterceptor implements Interceptor{
	public void intercept(Invocation inv) {
		String email = inv.getController().getSessionAttr("email");
		if(email == null || email.length() <= 0){
			inv.getController().redirect("/test");
		}else{
			inv.invoke();
		}
	}
}
